package app.security;

import java.util.HashMap;

/**
 * Contains all accessible applications for the profile and the security level
 * to access. It is loaded by means of ProfileLoad.java so that all application
 * groups are transformed to applications.
 * 
 * @author eduard
 * 
 */
public class Profile {
	// Security level to application
	private String name;
	// Name of application & security Level
	private HashMap<String, Integer> apps;

	public Profile() {
		apps = new HashMap<String, Integer>();
	}

	public Profile(String name) {
		this.setName(name);
		apps = new HashMap<String, Integer>();
	}

	public String getAppNamesString() {
		String s = "";
		for (String ap : getApps().keySet()) {
			s = s + ap + ";";
		}
		return s;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public HashMap<String, Integer> getApps() {
		return apps;
	}

	public void setApps(HashMap<String, Integer> apps) {
		this.apps = apps;
	}

}
